package com.harlan.viewbindingstudy;


import java.util.List;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

public class FragmentAdpter extends FragmentPagerAdapter {
    List<Fragment> fragmentList;

    public FragmentAdpter(FragmentManager fm, List<Fragment> mfragmentList) {
        super(fm);
        this.fragmentList = mfragmentList;
    }

    @Override
    public Fragment getItem(int position) {
        return fragmentList.get(position);
    }

    @Override
    public int getCount() {
        return fragmentList.size();
    }
}
